package de.argh.codebook.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

public class Coder {

  /**
   * Internal Idetifier of an user.
   */
  @NotNull
  private Long id;

  /**
   * Idetifier for login
   */
  @NotEmpty
  private String email;

  private String surname;

  @NotNull
  private String name;

  private Date birthdate;

  private List<Article> articles;

  private List<Coder> follower;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getSurname() {
    return surname;
  }

  public void setSurname(String surname) {
    this.surname = surname;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Date getBirthdate() {
    return birthdate;
  }

  public void setBirthdate(Date birthdate) {
    this.birthdate = birthdate;
  }

  public List<Article> getArticles() {
    if (articles == null) {
      articles = new ArrayList<Article>();
    }
    return articles;
  }

  public void setArticles(List<Article> articles) {
    this.articles = articles;
  }

  public List<Coder> getFollower() {
    if (follower == null) {
      follower = new ArrayList<Coder>();
    }
    return follower;
  }

  public void setFollower(List<Coder> follower) {
    this.follower = follower;
  }

}
